package com.ouyy.volunteerservice.volunteer.service;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.ouyy.volunteerservice.volunteer.domain.po.Organizations;
import com.ouyy.volunteerservice.volunteer.mapper.OrganizationsMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class OrganizationsService extends ServiceImpl<OrganizationsMapper, Organizations> {
    @Autowired
    private OrganizationsMapper organizationsMapper;

    public Organizations findByOrganAndPassword(String username, String password) {
        log.error("username"+username);
        return organizationsMapper.selectOne(new QueryWrapper<Organizations>().eq("organization_name", username).eq("password", password));
    }
}
